package com.lagou.rpc.zk;

import org.apache.curator.framework.api.CuratorWatcher;

import java.util.List;

/**
 * 参考了dubbo的 org.apache.dubbo.remoting.zookeeper.ZookeeperClient
 */
public interface ZkClient {
    List<String> addChildListener(String path, CuratorWatcher listener);
    CuratorWatcher createChildListener(String path, ChildListener listener);
    void create(String path, boolean ephemeral);
    List<String> getChildren(String path);
    boolean isConnected();
    void close();
    String getUrl();
    void create(String path, String content, boolean ephemeral);
    String getContent(String path);
    boolean exists(String path);
    void delete(String path);
}
